<script>
import { getConfit, getUserInfo, add_user_log } from 'common/api.js';
import { initWxConfig, setIndexPagetoShare } from 'common/index.js';
import store from 'store/index.js';
export default {
	onLaunch: function() {
		//uni.removeStorageSync('topHeight');
		/* uni.getSystemInfo({
		    success:function(e){  
		        Vue.prototype.statusBar = e.statusBarHeight  
		        // #ifndef MP  
		        if(e.platform == 'android') {  
		            Vue.prototype.customBar = e.statusBarHeight + 50  
		        }else {  
		            Vue.prototype.customBar = e.statusBarHeight + 45  
		        }  
		        // #endif  
				
		        // #ifdef MP-WEIXIN  
		        let custom = wx.getMenuButtonBoundingClientRect()  
		        Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight  
		        // #endif  
				
		        // #ifdef MP-ALIPAY  
		        Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight  
		        // #endif  
		    }  
		}) */
	},
	computed: {
	    i18n() {
	        return this.$t('message');
	    }
	},
	onShow: function() {
		console.log('App Show');
		let _self = this;
		// 取值存储的语言
		let lang = uni.getStorageSync('select');
		console.log(111,lang)
		// 判断选择的语言
		if (lang) {
		    _self.$i18n.locale = lang;
		} else {
		    _self.$i18n.locale = 'zh-CN';
		}
		
		// 进入小程序统计访问次数
		/* if (store.state.token) {
			this.$store.commit('get_unread');
			const token = store.state.token;
		} */
	},
	onHide() {
		//uni.removeStorageSync('topHeight');
	}
};
</script>

<style lang="scss">
// #ifndef APP-PLUS-NVUE (条件编译, 这里的注释符号是必须的)
@import 'styles/iconfont.scss';
@import 'styles/iconfonts.scss';
//@import 'styles/bootstrap.min.css';
/* 导入全局样式 自定义*/
@import '/static/css/common.css';

/*每个页面公共css */
page {
	background-color: $uni-bg-color;
	height: 100%;
}
@font-face {
	font-family: PingFang SC;
}
image {
	display: block;
}
view,
scroll-view,
swiper,
swiper-item,
cover-view,
cover-image,
icon,
text,
rich-text,
progress,
button,
checkbox,
form,
input,
label,
radio,
slider,
switch,
textarea,
navigator,
audio,
camera,
image,
video {
	box-sizing: border-box;
}
.bold {
	font-weight: bold;
}
.flex-wrap {
	display: flex;
	flex-direction: flex-wrap;
	align-items: center;
}
.flex-column {
	display: flex;
	flex-direction: column;
	align-items: center;
}
button {
	&:after {
		border: 0;
	}
}
.assemble-btn {
	color: #fff;
	font-size: 28rpx;
	display: flex;
	align-items: center;
	justify-content: center;
}
.empty-btn {
	font-size: 28rpx;
	display: flex;
	align-items: center;
	justify-content: center;
}
// #endif
</style>
